//
// Created by Admin on 2021/9/24.
//

#ifndef PRACTISE10_MY_STACK_H
#define PRACTISE10_MY_STACK_H
#include <stdio.h>
#include <stdlib.h>

enum {
    number,character
};

typedef struct StackItem{
    int type;
    int value;
    struct StackItem* prev;
}StackItem,*pStackItem;

typedef struct {
    //栈底指针
    pStackItem ebp;
    //栈顶指针
    pStackItem esp;
}Stack,*pStack;

pStack make_stack();
void destroy_stack(pStack stack);
void push(pStack stack, pStackItem item);
pStackItem peek(pStack stack);
int pop(pStack stack);
void printStackTrace(pStack stack);

#endif //PRACTISE10_MY_STACK_H
